package com.glsc.ngateway.common.api.flowable.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@Builder
@NoArgsConstructor
@ToString
public class FlowFormEventDetailImproveDto implements Serializable {

    @ApiModelProperty(value = "整改措施ID")
    private Integer improveId;

    @ApiModelProperty(value = "流程ID")
    private String processId;

    @Builder.Default
    @ApiModelProperty(value = "是否删除标记，0未删除，1删除")
    private Integer beDeleted = 0;

    @ApiModelProperty(value = "整改标题")
    String improveTitle;

    @ApiModelProperty(value = "整改内容")
    String improveContent;

    @ApiModelProperty(value = "整改负责人账号")
    String improvePersonList;

    @ApiModelProperty(value = "整改负责人姓名")
    String improvePersonNameList;

    @ApiModelProperty(value = "计划完成时间")
    protected String planDate;

    @ApiModelProperty(value = "实际完成时间")
    protected String finishDate;

    private Integer sortNo;

    @ApiModelProperty(value = "事件整改措施触发整改流程ID")
    private String improveProcessId;

    @ApiModelProperty(value = "整改状态 字典")
    private String improveState;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime insertTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

}
